bitkeeper revision 1.1429.2.2 (428a036cO1cnBZO53U3HCW-Lk42RtA)
authorcl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 17 May 2005 14:45:00 +0000 (14:45 +0000)
committercl349@firebug.cl.cam.ac.uk <cl349@firebug.cl.cam.ac.uk>
Tue, 17 May 2005 14:45:00 +0000 (14:45 +0000)
network:
  Handle xend restart -- don't take down the network setup and don't
  initialize it if it looks already initialized.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
tools/examples/network

index 47daae95b0efb125a829a52b9eb7caf5af43f8ef..4bec37f5beb87ca3b16a8a824093c9fa54f2d063 100755 (executable)
@@ -164,6 +164,10 @@ op_start () {
 
     create_bridge ${bridge}
 
+    if ifconfig 2>/dev/null | grep -q veth0 ; then
+        return
+    fi
+
     if ifconfig veth0 2>/dev/null | grep -q veth0 ; then
         # Propagate MAC address and ARP responsibilities to virtual interface.
         mac=`ifconfig ${netdev} | grep HWadd | sed -e 's/.*\(..:..:..:..:..:..\).*/\1/'`
@@ -197,6 +201,8 @@ op_stop () {
         return
     fi
 
+    return
+
     brctl delif ${bridge} ${netdev}
 
     if ifconfig veth0 2>/dev/null | grep -q veth0 ; then